<div style="padding: 0 20px;width:100%;position: absolute;left: 0px;top: 50%;margin-top: -150px;">
<div class="row">
  <form ng-class="{'col s12':mobile,'col s6 offset-s3':!mobile}">
    <div class="row">
      <div class="input-field col s12">
        <input id="username" type="text" ng-class="{'invalid':User.nameError,'validate':!User.nameError}" ng-model="User.name" ng-blur="User.checkName()">
        <label for="username" ng-class="{'active':User.rememberStuff}">用户名</label>
        <div class="red-text text-darken-2" ng-if="User.nameError != ''" ng-bind="User.nameError"></div>
      </div>
    </div>
    <div class="row">
      <div class="input-field col s12">
        <input id="password" type="password" ng-class="{'invalid':User.passwordError,'validate':!User.passwordError}" ng-model="User.password" ng-focus="User.passwordError='';">
        <label for="password" ng-class="{'active':User.rememberStuff}">密码</label>
        <div class="red-text text-darken-2" ng-if="User.passwordError != ''" ng-bind="User.passwordError">密码错误</div>
      </div>
    </div>   
    <div class="row">
      <div class="col s12">
        <input type="checkbox" id="user-remember" checked="checked" ng-model="User.remember"/>
        <label for="user-remember">记住密码</label>
        <a href="#!/reg" class="right red-text text-darken-2">没有账号，立即注册</a>
      </div>
    </div>
    <div class="row">
      <a class="waves-effect waves-light btn col s12 red hoverable" ng-click="User.login()">登 录</a>
    </div>
  </form>
</div>  
</div>